import { Connection } from "mongoose"

import { DBCONSTANTS } from "@/database/db.constants"

import { InterfaceSchema } from "./interface.schema"

export const InterfaceProviders = [
  {
    provide: DBCONSTANTS.interfaceModel,
    useFactory: (connection: Connection) => connection.model("Interface", InterfaceSchema),
    inject: [DBCONSTANTS.databaseConnection]
  }
]